<!--src/main/resources/templates/pictrue/pictrue.html-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片信息</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/styles.css}">
</head>
<body>
<h2>图片信息</h2>
<a th:href="@{/pictrue/add}" class="btn-blue">新增图片</a>
<a th:href="@{/pictrue/search}" class="btn-blue">查看图片</a>
<a th:href="@{/index}" class="btn-blue">回到首页</a>
<table>
    <thead>
    <tr>
        <th>图片编号</th>
        <th>图片标题</th>
        <th>图片内容</th>
        <th>图片地址</th>
        <th>用户编号</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="picture : ${pictures}">
        <td th:text="${picture.id}"></td>
        <td th:text="${picture.title}"></td>
        <td th:text="${picture.content}"></td>
        <td th:text="${picture.url}"></td>
        <td th:text="${picture.user_id}"></td>
        <td>
            <a th:href="@{'/pictrue/edit/' + ${picture.id}}" class="btn-gray">编辑</a>
            <a th:href="@{'/pictrue/delete/' + ${picture.id}}" class="btn-red">删除</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>
